<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<!-- HTML file produced from file: manual.tex --
 -- using Hyperlatex v 2.3.1 (c) Otfried Cheong--
 -- on Emacs 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid, Fri Dec  3 20:36:12 2004 -->
<HEAD>
<TITLE>Scheme 48 Manual -- Command line arguments</TITLE>

</HEAD><BODY BGCOLOR="#ffffff">
<EM>Scheme 48 Manual</EM> | <A HREF="s48manual.html#top_node">Contents</A> | In Chapter: <A HREF="s48manual_3.html">User's guide</A><BR>Previous: <A HREF="s48manual_3.html">User's guide</A> | Next: <A HREF="s48manual_5.html">Command processor</A>
<H2>Command line arguments</H2>
<P>A few command line arguments are processed by Scheme&nbsp;48 as
 it starts up.
<P><CODE>scheme48</CODE>
[<CODE>-i</CODE> <CODE><I>image</I></CODE>]
[<CODE>-h</CODE> <CODE><I>heapsize</I></CODE>]
[<CODE>-a</CODE> <CODE><I>argument&nbsp;...</I></CODE>]
<P><DL><DT><B><TT>-i</TT> <CODE><I>image</I></CODE></B><DD>
    specifies a heap image file to resume.  This defaults to a heap
    image that runs a Scheme command processor.  Heap images are
    created by the <CODE>,dump</CODE> and <CODE>,build commands</CODE>, for which see below.
<P><DT><B><TT>-h</TT> <CODE><I>heapsize</I></CODE></B><DD>
    specifies how much space should be reserved for allocation.
    <CODE><I>Heapsize</I></CODE> is in words (where one word = 4 bytes), and covers both
    semispaces, only one of which is in use at any given time (except
    during garbage collection).  Cons cells are currently 3 words, so
    if you want to make sure you can allocate a million cons cells,
    you should specify <CODE>-h 6000000</CODE> (actually somewhat more than this,
    to account for the initial heap image and breathing room).
    The default heap size is 3000000 words.  The system will use a
    larger heap if the specified (or default) size is less than
    the size of the image being resumed.
<P><DT><B><TT>-a</TT> <CODE><I>argument&nbsp;...</I></CODE></B><DD>
    is only useful with images built using <CODE>,build</CODE>.
    The arguments are passed as a list of strings to the procedure specified
    in the <CODE>,build</CODE> command as for example:
<BLOCKQUOTE><PRE>
&gt; (define (f a) (for-each display a) (newline) 0)
&gt; ,build f foo.image
&gt; ,exit
% scheme48vm -i foo.image -a mumble "foo x"
mumblefoo x
%
</PRE></BLOCKQUOTE>
</DL>
<P>The usual definition of the <CODE>s48</CODE> or <CODE>scheme48</CODE> command is actually a
 shell script that starts up the Scheme&nbsp;48 virtual machine with a
 <CODE>-i <CODE><I>imagefile</I></CODE></CODE>
specifying the development environment heap image and a
 <CODE>-o <CODE><I>vm-executable</I></CODE></CODE> specifying the location of the virtual-machine
 executable (the executable is needed for loading external code on some
 versions of Unix; see section&nbsp;<A HREF="s48manual_70.html">*</A>
 <A HREF="s48manual_70.html">for more information</A>).
The file <CODE>go</CODE> in the Scheme&nbsp;48 installation source directory is an example
 of such a shell script.
<P><P>
  
Previous: <A HREF="s48manual_3.html">User's guide</A> | Next: <A HREF="s48manual_5.html">Command processor</A></BODY></HTML>
